import request from '@/utils/request'
export function list(params) {
  return request({
    url: '/iot/list',
    method: 'get',
    params
  })
}

export function sendCmd(data) {
  return request({
    url: '/iot/sendCmd',
    method: 'post',
    data: data
  })
}


export function getData(params) {
  return request({
    url: '/iot/getData',
    method: 'get',
    params
  })
}
export function queryDeviceProperty(params) {
  return request({
    url: '/iot/query-device-property',
    method: 'get',
    params
  })
}
export function getHistory(params) {
  return request({
    url: '/iot/device-history',
    method: 'get',
    params
  })
}
export function deleteRecords(data) {
  return request({
    url: '/iot/delete',
    method: 'post',
    data
  })
}
export function updateRecords(data) {
  return request({
    url: '/iot/updates',
    method: 'post',
    data
  })
}
export function insertRecords(data) {
  return request({
    url: '/iot/insertRecords',
    method: 'post',
    data
  })
}
